package com.fofia.iotweb.web.dbdomain.services.iot;


import cn.hutool.core.date.DateUtil;
import cn.hutool.log.StaticLog;
import com.fofia.iotweb.web.dbdomain.mappers.iot.IotTagXdataTimeMapper;
import com.fofia.iotweb.web.dbdomain.models.iot.IotTagXdataTime;
import org.noear.solon.annotation.Component;
import org.noear.solon.annotation.Inject;

@Component
public class IotTagXdataTimeService {

    @Inject
    private IotTagXdataTimeMapper xdataTimeMapper;

    /**
     * 插入数据
     * @param model
     */
    public void insert(IotTagXdataTime model){
        try{
            model.setCreateTime(DateUtil.date());
            model.setRemark("算法结果");
            xdataTimeMapper.insert(model);
        }catch (Exception ex){
            StaticLog.error(ex);
        }
    }
}
